home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
695
< prev
next >
Wrap
Internet Message Format
|
1996-08-06
|
886b
Path: isonews.bbn.hp.com!news
From: Bruno RICHARD <bruno_richard@hp-france-om1.om.hp.com>
Newsgroups: comp.std.c
Subject: int main(void) or int main()?
Date: 4 Apr 1996 19:21:51 GMT
Organization: Hewlett-Packard
Message-ID: <4k17gf$gob@isoit109.bbn.hp.com>
NNTP-Posting-Host: gplbrd.grenoble.hp.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 1.2N (Windows; I; 16bit)
What is the recommended declaration for a function that does
not take arguments and does not return anything:
void myfunc();
or
void myfunc(void);
I remember that few years ago on Turbo C 2.0 the second form was better
optimized. So I got used to do so, but I just read the C FAQ and noticed
that there was some argument about main() returning int or void, and
I am wondering whether there could be some portability problems around.
-bruno